<?php if ($this->pageCount > 1): ?>
<div class="text-center">
    
    <ul class="pagination">
    
        <!-- Previous page link -->
        <?php if (isset($this->previous)): ?>
            <li><a href="<?php echo $this->url(array('page' => $this->first)); ?>">&laquo;</a></li>
            <li><a href="<?php echo $this->url(array('page' => $this->previous)); ?>">&lsaquo;</a></li>
        <?php else: ?>
            <li class="disabled"><a href="#">&laquo;</a></li>
            <li class="disabled"><a href="#">&lsaquo;</a></li>
        <?php endif; ?>
        
        <!-- Numbered page links -->
        <?php foreach ($this->pagesInRange as $page): ?>
            <?php if ($page != $this->current): ?>
                <li><a href="<?php echo $this->url(array('page' => $page)); ?>"><?php echo $page; ?></a></li>
            <?php else: ?>
                <li class="active"><a href="#"><?php echo $page; ?> <span class="sr-only">(current)</span></a></li>
            <?php endif; ?>
        <?php endforeach; ?>
        
        <!-- Next page link -->
        <?php if (isset($this->next)): ?>
            <li><a href="<?php echo $this->url(array('page' => $this->next)); ?>">&rsaquo;</a></li>
            <li><a href="<?php echo $this->url(array('page' => $this->last)); ?>">&raquo;</a></li>
        <?php else: ?>
            <li class="disabled"><a href="#">&rsaquo;</a></li>
            <li class="disabled"><a href="#">&raquo;</a></li>
        <?php endif; ?>
        
    </ul>

</div>
<?php endif; ?>